package com.wx.Annotation;

/**
 * @description:
 * @author: wangxun
 * @createDate: 2021/12/27
 * @version: 1.0
 */
public class ClassA {
    @WxInject
    private SingletonB singletonB;


    private void sayHi(){
        System.out.println(singletonB.counter);
    }

    public static void main(String[] args) {
        try {
            ClassA classA = MyContainer.newInstance(ClassA.class);
            classA.sayHi();

            ClassA classA2 = MyContainer.newInstance(ClassA.class);
            classA2.sayHi();


        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}
